import numpy, os, sys, glob
from setuptools import setup, find_packages, Extension
#from distutils.core import setup
#from distutils.extension import Extension
from Cython.Distutils import build_ext
#import ez_setup
#ez_setup.use_setuptools()


ext = []
g = os.path.join(os.path.split(__file__)[0], "simplui", "*.pyx")
for f in glob.iglob(g):
	modfile = os.path.split(f)[1]
	modname = os.path.splitext(modfile)[0]
	e = Extension("simplui."+modname, 
	             ["simplui/"+modfile,], 
	             language="c++",
	             include_dirs = [numpy.get_include(),],
	             )
	ext.append(e)
	
setup(
	name = 'simplui-fast',
	version = '1.0.5',
	author = 'Ricardo Henriques, original code by Tristam MacDonald',
	author_email = 'paxcalpt@gmail.com',
	description = 'Light-weight GUI toolkit for pyglet (cython version)',
	url = 'http://code.google.com/r/paxcalpt-fast-simplui/',
	platforms = ['all'],
	license = 'BSD',
	classifiers = [
		'Development Status :: 4 - Beta',
		'Intended Audience :: Developers',
		'License :: OSI Approved :: BSD License',
		'Natural Language :: English',
		'Operating System :: OS Independent',
		'Programming Language :: Python :: 2',
		'Topic :: Scientific/Engineering :: Human Machine Interfaces',
		'Topic :: Software Development :: User Interfaces',
	],
	packages = find_packages(),
	install_requires = ['distribute', 'simplejson >= 2.0', 'pyglet >= 1.1'],
	cmdclass = {'build_ext': build_ext},
	ext_modules = ext
)
